package com.freesun.monitor.db;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Created by yangfei on 13-12-6.
 */
public class MultInsertMariaDb implements Runnable{

    private  Logger log = LoggerFactory.getLogger(this.getClass());
    private  String tag = "MultInsertMariaDb";

    private OperateMariaDb operateMariaDb;
    private String sql;

    public MultInsertMariaDb(String sql,OperateMariaDb operateMariaDb){
        this.sql = sql;
        this.operateMariaDb =operateMariaDb;
    }

    @Override
    public void run() {
        int id = this.operateMariaDb.InsertData(this.sql);
        if (id>0){
            log.debug(tag,"启动线程插入"+this.sql+"成功!");
        }else {
            log.debug(tag,"启动线程插入"+this.sql+"失败!");
        }

    }

}
